<template>
  <div>
    <plant-header :tableData="headerData" v-model="selectedItem"></plant-header>
  </div>
</template>

<script>
import PlantHeader from "./plant-header.vue";
export default {
  components: { PlantHeader },
  data() {
    return {
        headerData: [
            {id:1,name:"JAVA"},
            {id:2,name:"WEB"},
            {id:3,name:"UI"},
        ],
        selectedItem: {
        }
    }
  },
  watch: {
    headerData: {
      immediate: true,
      handler(newVal) {
        if (newVal) {
          this.selectedItem = newVal[0];
        }
      }
    }
  }
}
</script>

<style>

</style>